package com.augurit.gzcgwsp.ywcmn.service.impl;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.Session;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.augurit.gzcgwsp.ywcmn.dao.YwComQyxxFinalDao;
import com.augurit.gzcgwsp.ywcmn.entity.YwComFinalQyxx;
import com.augurit.gzcgwsp.ywcmn.service.IYwComQyxxFinalService;
/**
 * 原始企业基本信息service实现类
 * <P>title:</p>																								
 * <P>Description：</p>
 * <p>Copyright: Copyright (c) 2011 augurit</p>
 * <p>Company: 广州奥格智能科技</p>
 * History：
 * @author:zhangjun
 * @date 2011-10-12
 * @version 1.0
 */
@Service
@Transactional
public class YwComQyxxFinalServiceImpl implements IYwComQyxxFinalService{
    private static final Log log=LogFactory.getLog(YwComClxxServiceImpl.class);
	@Autowired
	private YwComQyxxFinalDao ywComQyxxFinalDao;
	
	
	/*
	 * 
	 * @see com.augurit.gzcgwsp.ywcmn.service.IYwComQyxxFinalService#get(java.lang.Long)
	 */
	@Transactional(readOnly = true)
	public YwComFinalQyxx getEntityByQyId(Long qyid) {
	    YwComFinalQyxx entity = ywComQyxxFinalDao.getEntityByQyId(qyid);
		return entity;
	}

	/*
	 * 保存实体
	 * @see com.augurit.gzcgwsp.ywcmn.service.IYwComQyxxFinalService#saveEntity(com.augurit.gzcgwsp.ywcmn.entity.YwComFinalQyxx)
	 */
    public boolean saveOrUpdateEntity(YwComFinalQyxx entity) {
        boolean flag=false;
        try {
            ywComQyxxFinalDao.save(entity);
            flag=true;
        } catch (Exception e) {
           log.error("保存原始企业信息出现错误"+e);
        }
        return flag;
    }

}
